#ifndef DIALOGLOGIN_H
#define DIALOGLOGIN_H

#include <QDialog>
#include "SecureDataStore.h"
#include "SharedPtr.h"


namespace Ui {
class DialogLogin;
}

class DialogLogin : public QDialog
{
    Q_OBJECT

public:
    explicit DialogLogin(QWidget *parent = 0);
    ~DialogLogin();

	void setDataStore(std::shared_ptr< SecureDataStore>& dataStore);

    QString getUser();

private slots:
    void on_pushButtonLogin_clicked();

private:
	bool checkAccount(const QString& name, const QString& password);

private:
    Ui::DialogLogin *ui;

private:
	std::shared_ptr< SecureDataStore> m_dataStore;
};

#endif // DIALOGLOGIN_H
